Fix lint errors: remove deprecated React imports and refactor nested ternaries#76
Merged
johnnyhuy merged 2 commits intosnyk-fix-86436984567a7c34273af6f435830008from Jan 15, 2026
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ernaries, remove unused vars, and update ESLint config Co-authored-by: johnnyhuy <27847622+johnnyhuy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update docker base image from debian 12-slim to 13.2-slim
Fix lint errors: remove deprecated React imports and refactor nested ternaries
Jan 10, 2026
f2fa770
into
snyk-fix-86436984567a7c34273af6f435830008
2 checks passed
Greptile SummaryThis PR resolves CI lint failures by modernizing React usage patterns and fixing code quality issues across the codebase. Key Changes:
Considerations: Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant CI as CI Pipeline
participant ESLint as ESLint
participant Icons as Icon Components
participant Pages as Page Components
Dev->>CI: Push changes (before PR)
CI->>ESLint: Run lint check
ESLint->>Icons: Check icon files
Icons-->>ESLint: Error: deprecated React imports
ESLint->>Pages: Check page files
Pages-->>ESLint: Error: nested ternaries
Pages-->>ESLint: Error: unused variables
ESLint-->>CI: Lint failed ❌
CI-->>Dev: CI failed
Dev->>Icons: Remove React imports, React.FC
Dev->>Pages: Refactor ternaries to IIFE
Dev->>Pages: Remove unused variables
Dev->>ESLint: Update config (argsIgnorePattern)
Dev->>CI: Push fixes (this PR)
CI->>ESLint: Run lint check
ESLint->>Icons: Validate plain function components
Icons-->>ESLint: Pass ✓
ESLint->>Pages: Validate IIFE pattern
Pages-->>ESLint: Pass ✓
ESLint-->>CI: All checks passed ✓
CI-->>Dev: CI succeeded
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI lint was failing with errors for deprecated React default imports, nested ternary expressions, and unused variables.
Changes
import * as ReactandReact.FCto plain function components per Backstage JSX transform migrationisNegative,theme, andconsole.errorstatementargsIgnorePattern: '^_'to support underscore-prefixed unused function parameters in type signaturesit.skipfrom App.test.tsx💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.